//
//  HOTCommTableView.m
//  Genpara
//
//  Created by AndyChang.zhang on 14-9-22.
//  Copyright (c) 2014年 zhangchh. All rights reserved.
//

#import "HOTCommTableView.h"
#import "HOTNickLabel.h"

@interface HOTCommTableView () {
    
    BOOL is;
}

@end

@implementation HOTCommTableView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        //[self initFooterAndHeaderView];
    }
    return self;
}

-(id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style {
    
    self = [super initWithFrame:frame style:style];
    
    if (self) {
        
        //[self initFooterAndHeaderView];
    }
    return self;
}


-(void)initFooterAndHeaderView {
    
    self.footerView = [[MJRefreshFooterView alloc] initWithScrollView:self];
    //    self.footerView.beginRefreshingBlock = ^(MJRefreshBaseView *refreshView) {
    //
    //
    //    };
    
    self.headerView = [[MJRefreshHeaderView alloc] initWithScrollView:self];
    //    self.headerView.beginRefreshingBlock = ^(MJRefreshBaseView *refreshView) {
    //
    //        
    //    };
}

-(void)setShowFooter:(BOOL)showFooter {
    
    if (showFooter) {

        self.footerView = [[MJRefreshFooterView alloc] initWithScrollView:self];
    }
}

-(void)setShowHeader:(BOOL)showHeader {
    
    if (showHeader) {
#warning 去掉下拉刷新
        //self.headerView = [[MJRefreshHeaderView alloc] initWithScrollView:self];
    }
}

//-(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event{
//    
//    NSLog(@"aaaaa %d", [super pointInside:point withEvent:event]);
//    
//    return [super pointInside:point withEvent:event];
//}
//
//-(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
//    
//    if ([[super hitTest:point withEvent:event]  isKindOfClass:[HOTNickLabel class]]) {
//        
//        is = YES;
//    } else {
//        is = NO;
//    }
//    
//    NSLog(@"aaaaa--- %@", [super hitTest:point withEvent:event]);
//    //return nil;
//    return [super hitTest:point withEvent:event];
//    
//    
//}
//

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/
//-(BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view {
//    
//    if ([view isKindOfClass:[HOTNickLabel class]]) {
//        
//        //[self.nextResponder touchesBegan:touches withEvent:event];
//        return NO;
//    }
//    
//    return YES;
//}
////
//-(BOOL)touchesShouldCancelInContentView:(UIView *)view {
//    
//    if ([view isKindOfClass:[HOTNickLabel class]]) {
//        
//
//        //[self.nextResponder touchesBegan:touches withEvent:event];
//        return NO;
//    }
//    
//    return YES;
//}
@end
